home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2117 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: news.nstn.ca!news
  2. From: nstn181a@fox.nstn.ca (Pierre G. Boutquin)
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.perl
  4. Subject: Re: Stupid array problems
  5. Date: Mon, 15 Jan 96 20:09:44 -0400
  6. Organization: Nova Scotia Technology Network
  7. Message-ID: <4dettv$3q1@news.nstn.ca>
  8. NNTP-Posting-Host: toronto-ts-32.nstn.ca
  9.  
  10. In <4dbfd1$2hpc@news.gate.net>, William Hutto writes:
  11. >In article <4d9b9v$14n@paperboy.ids.net>,
  12. >   scarney@conan.ids.net (scarney) wrote:
  13. >>Ok, I've been having what I thought would be a simple problem but no one 
  14. >>seems to quite figure out. I Have an array of strings, both the key and 
  15. >>the string being pointers. Putting information onto the array is like a 
  16. >>stack.  My problem comes in the removal of information from it. Popping 
  17. >>from a stack only pulls the lastelement out of the array, I want to pull 
  18. >>any element out. Destroying the data isn't the hard part because I just 
  19. >>blow up the pointers...the problem is that the indexing for the array 
  20. >>gets kind of screwy. If I have an array organized by integers with 
  21. >>elements 1 2 3 4 5 6 7 8, if I decided to kill element #4 I'm going to 
  22. >>have an array of 1 2 3 5 6 7 8.
  23.  
  24. Why not use a linked list?
  25.  
  26. Pierre.
  27.